package day4.作业1026.作业01;

public class Perrot extends Pet {
    public Perrot(String name, int health, int love) {
        super(name, health, love);
    }
    protected void fly(){
        super.show();
        System.out.println("自由飞翔");
    }

    @Override
    protected void show() {
        super.show();
        System.out.println("我是鹦鹉不是八哥");

    }

    public void eat() {
        super.health+=20;
        System.out.println(name+"吃虫");
    }
}
